import request from '@/utils/request'

// 登录方法
export function login(username, password, code, uuid) {
  const data = {
    username,
    password,
    code,
    uuid
  }
  return request({
    url: '/login',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

// 饼状图
export function dataCompare(data) {
  return request({
    url: '/energy/record/data/compare',
    method: 'GET',
    params: data
  })
}

// 柱状图
export function dataArea(data) {
    return request({
      url: '/energy/record/data/area',
      method: 'GET',
      params: data
    })
  }
  
// 折线图1
export function dataLine(data) {
    return request({
      url: '/energy/record/data/line',
      method: 'GET',
      params: data
    })
  }
// 折线图2
  export function dataGarbage(data) {
    return request({
      url: '/energy/record/data/garbage',
      method: 'GET',
      params: data
    })
  }
  
